package cn.sstir.api.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.concurrent.Callable;

/**
 * @title: TestController
 * @description: TODO
 * @author: fli
 * @email: fli@sstir.cn
 * @date: 2019/8/26 14:30
 */
@Controller
public class TestController {

    @GetMapping("/hello")
    @ResponseBody
    public Callable<String> test(@RequestParam Integer para) throws InterruptedException {
        return new Callable<String>() {
            @Override
            public String call() throws Exception {
               int i = 1 /0;
                return "hello";
            }

        };
    }
}
